<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>音乐播放器</title>
</head>

<body>
  <audio id="myAudio" controls>
    <source src="hpy.mp3" type="audio/mpeg">
    你的浏览器不支持 audio 元素。
  </audio>
  <button onclick="playMusic()">播放</button>
  <button onclick="pauseMusic()">暂停</button>
  <script>
    const audio = document.getElementById('myAudio');
    function playMusic() {
      audio.play();
    }
    function pauseMusic() {
      audio.pause();
    }
  </script>
</body>

</html>

